/**      
 * @file		circle.cpp
 * @description		This example demonstrates how to create a 
 *			class and invoke its member functions.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

// CONSTANT VARS
const double PIE = 3.14159;

/**
 * Contains information about a circle
 */
class Circle {
public:
	/**
	 * Gets the circles radius
	 * @return the circle's radius
	 */
	double getRadius();

	/**
	 * Sets the circle's radius
	 * @param aRadius the circle's radius
	 */
	void setRadius(double aRadius);

	/**
	 * Gets the circles area
	 * Area of a circle is r^2*PIE
	 * @return the circle's area
	 */
	double getArea();

// the private modifier restricts access to the 
// member variable(s)
// information hiding
private:
	double mRadius;
};

/**
 * @return zero if the application executes successfully
 */
int main() {
	Circle circle;
	Circle circle2;

	// we must use dot notation to invoke the member functions
	circle.setRadius(10);

	// notice that circle1 is a separate object altogether
	// it has its own radius. Setting the radius of circle2 has
	// no effect on circle1. Wow!
	circle2.setRadius(25);

	cout << "Circle's radius is " << circle.getRadius() << endl;
	cout << "Circle's area is " << circle.getArea() << endl;
	cout << "Circle2's radius is " << circle2.getRadius() << endl;
	cout << "Circle2's area is " << circle2.getArea() << endl;

	return 0;
}

void Circle::setRadius(double aRadius) {
	mRadius = aRadius;
}

double Circle::getRadius() {
	return mRadius;	
}

double Circle::getArea() {
	return mRadius*mRadius*PIE;
}

